package com.observed;

/**
 * 观察者实现
 * 
 * @author zincredible
 * @date 2019-01-23 08:51:22
 */
public class ObservedImpl implements Observed {

	private String name;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public ObservedImpl(String name) {
		super();
		this.name = name;
	}

	@Override
	public void update(String msg) {
		System.out.println("观察者 " + name + " 收到消息：" + msg);

	}

}
